//
//  ZTNotifiction.h
//  ZHYYTool
//
//  Created by MT-SW-005 on 2021/11/4.
//  Copyright © 2021 MT-SW-005. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ZTNotifiction : NSObject
{
    NSNotificationCenter *center;
}

/**
* 初始化
center =[NSNotificationCenter defaultCenter]
*/
-(id)init;


/**
* 添加监控对象
* the observer selector function exmple:
* -(void)funcNme:(NSNotification*)noti
* {
*  NSString *message  = [noti.userInfo  objectForKey:@"key"];
*  }
*/
- (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject;

/**
* 发送通知
*/
-(void)sendNotifictionWithName:(nullable NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)info;


/**
* 删除监控对象
*/
- (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject;

@end

NS_ASSUME_NONNULL_END
